//
//  LTCallManager.h
//  LTChat
//
//  Created by 俊松何 on 2017/8/1.
//  Copyright © 2017年 俊松何. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "LTCallManagerDelegate.h"
#import "LTError.h"
#import "LTCallSession.h"



@interface LTCallManager : NSObject

@property (nonatomic,strong) NSMutableArray<id<LTCallManagerDelegate> >* callMangerdelegateArray;

@property(nonatomic,assign) BOOL isCall;

@property(nonatomic,strong) LTCallSession *currentSession;

@property(nonatomic,copy) NSString *chanleId;   //音视频通道Id

/**
 添加呼叫回调

 @param delegate 回调代理对象
 */
- (void)addDelegate:(id< LTCallManagerDelegate >)delegate;




/**
 

 @param delegate 回调代理对象
 */
- (void)removeDelegate:(id< LTCallManagerDelegate >)delegate;


/**
  开始呼叫通话

 @param session 类型
 @param completionBlock 完成的block
 */
- (void) startCallSession:(LTCallSession *)session
               completion:(void(^)(LTError *aError))completionBlock;


/**
 拒绝通话
 
 @param session 通话类型
 @param completionBlock 拒绝完成的block
 */
-(void)refuseCall:(LTCallSession *)session
       completion:(void(^)(LTError *aError))completionBlock;

/**
 接受通话
 
 @param session 通话session
 @param completionBlock 接受完成的block回调
 */
-(void)acceptCall:(LTCallSession *)session
       completion:(void(^)(LTError *aError))completionBlock;


/**
 结束通话
 
 @param session 回话session
 @param reson 结束原因
 */
- (void)endCall:(LTCallSession *)session
         reason:(NSString *)reson
     completion:(void(^)(LTError *aError))completionBlock;


@end
